<template>
    <el-container>
    <el-header><el-button type="primary" @click="prev()">关闭</el-button></el-header>
    <el-main>
        <div :key="InvoiceForm[index].order.orderId" v-for="(item,index) in InvoiceForm">
            <p>订单信息</p>
            <el-table
                :data="InvoiceForm[index].invoice"
                border
                style="width: 100%">
                <el-table-column
                prop="sn"
                label="货号"
                width="180">
                </el-table-column>
                <el-table-column
                prop="name"
                label="商品名称"
                width="180">
                </el-table-column>
                <el-table-column
                prop="price"
                label="价格">
                </el-table-column>
                <el-table-column
                prop="spec"
                label="属性">
                </el-table-column>
                <el-table-column
                prop="onum"
                label="数量">
                </el-table-column>
                <el-table-column
                prop="omoney"
                label="小计">
                </el-table-column>
            </el-table>
            <span>商品总价:{{InvoiceForm[index].order.totalMoney}} 运费:{{InvoiceForm[index].order.orderFee}}
            订单总金额:{{InvoiceForm[index].order.payMoney}} 支付方式:{{InvoiceForm[index].order.payType==1? "线上支付":"货到付款"}}</span>
            <div>
            手机号码:{{InvoiceForm[index].order.mobile}}  提交时间:{{InvoiceForm[index].order.createTime}}
            订单编号:{{InvoiceForm[index].order.orderId}}  收货地址:{{InvoiceForm[index].order.address}}
            {{InvoiceForm[index].order.barcode}}
            </div>
        </div>
    </el-main>
    </el-container>
</template>
<script>
export default {
  data () {
    return {
      searchMap: {},
      InvoiceForm: [],
      InvoiceForms: []
    }
  },
  methods: {
    async getfindAll () {
      const { data: res } = await this.$http.get('/orders/order/findInvoice')
      this.InvoiceForm = res.data
      console.log(res.data)
    },
    prev () {
      this.$router.go(-1)
    }
  },
  async created () {
    this.getfindAll()
  }
}
</script>

<style>
  .el-header{
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    height: 550px;
  }
</style>
